home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Compilers⁄Interps / GCC-2.3.3r12 / Sources-Apple / stathack.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-15  |  348 b   |  14 lines  |  [TEXT/MPS ]

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <Files.h>
  4. #include <IOCtl.h>
  5. #include "stathack.h"
  6.  
  7. void fstat(int pFile, struct stat *pStat) {
  8.     int temp;
  9.     ioctl(pFile, FIOREFNUM, &temp);
  10.     pStat->st_ino = temp;
  11.     (void) GetVRefNum(pStat->st_ino, &pStat->st_dev);
  12.     /*fprintf(stderr, "F: %d, R: %d, D: %d\n", pFile, pStat->st_ino, pStat->st_dev);*/
  13. }
  14.